import http from '@/utils/request'

export default {
    /**
     * 查询部门列表
     * @param  params 
     * @returns 
     */
    async getDepartmentList(params) {
        return await http.get("/api/department/list", params)
    },
    async getParentTreeList() {
        return await http.get("/api/department/parent/list")
    },
    async addDept(params) {
        return await http.post("/api/department/add", params)
    },
    async checkDepartment(params) {
        return await http.getRestApi("/api/department/check", params)
    },
    async deleteById(params) {
        return await http.delete("/api/department/delete", params)
    },
    async editDept(params) {
        return await http.post("/api/department/update", params)
    }
}